<!--
 * @Author: hucc
 * @Date: 2021-09-16 17:34:12
 * @LastEditors: hucc
 * @LastEditTime: 2021-09-16 17:46:58
 * @Description: 
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/jquery.js"></script>
    <script>
        $(function() {

            var obj = {
                //val() 返回被选元素的属性值
                username: $("#username").val(),
                password: $("#password").val()
            }
            $.ajax({
                type: 'POST',
                url: "http://39.103.202.53:8888/user/login",
                data: JSON.stringify(obj),
                success: function(res) {
                    console.log(res);
                    //对成功数据的操作TODO：
                    //clearInterval(status);
                },
                timeout: 30 * 1000, // 超时时间
                // 超时意味着出错了
                error: function(error) {
                    console.log('失败啦');
                }

            });
        })
    </script>
</head>

<body>

</body>

</html>